<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head id="Head1">
   

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
	修改密码
</title>
    <script src="../resources/Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="../resources/Res/easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../resources/Res/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <link href="../resources/Res/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="../resources/Res/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            font-size: 12px;
            font-family: 微软雅黑,新宋体;
        }
        fieldset
        {
            margin: 0 auto;
            padding: 9px;
            border: 1px solid #CCC;
            width: 387px;
        }
        
        legend
        {
            font-size: 1.1em;
            font-weight: 600;
            padding: 2px 4px 8px 4px;
        }
        input[type="text"], input[type="password"]
        {
            width: 200px;
            border: 1px solid #CCC;
        }
        .editor-label
        {
            margin: 1em 0 0 0;
        }
        
        .editor-field
        {
            margin: 0.5em 0 0 0;
        }
        
        .field-validation-error, .validation-summary-errors
        {
            color: #ff0000;
        }
        .mbx
        {
            height: 23px;
            font-weight: bold;
            color: #9b6835;
            border-bottom: 1px #999 dotted;
            padding: 12px 19px 3px 19px;
            margin: 4px;
            background: url(../resources/images/direction.gif) 0 center no-repeat;
        }
        .buttonOn
        {
            background: url(../resources/images/buttonOn_login.gif) left top no-repeat;
            height: 21px;
            width: 109px;
            text-align: center;
            border: 0px;
            margin: 9px,150px,0px,222px;
        }
    </style>
    <script type="text/javascript">
	    $.extend($.fn.validatebox.defaults.rules, {    
	        minLength: {    
	            validator: function(value, param){    
	                return value.length >= param[0];    
	            },    
	            message: '密码最少为 {0}位字符'   
	        }    
	    });  
	
	    $.extend($.fn.validatebox.defaults.rules, {    
	        equals: {    
	            validator: function(value,param){    
	                return value == $(param[0]).val();    
	            },    
	            message: '两次输入的密码不匹配！'   
	        }    
	    });
    
    </script>
</head>
<body>
    <div class="mbx">
        	修改密码
    </div>
    <form action="/changePassword" method="post">
    <div>
        <fieldset>
            <legend>用户姓名：
                ${user.userName}
            </legend>
            <div class="editor-label">
                <label for="OldPassword">当前密码</label>：
            </div>
            <div class="editor-field">
                <input class="easyui-validatebox" id="OldPassword" name="oldPassword" type="password" />
                <!-- <span class="field-validation-valid" data-valmsg-for="OldPassword" data-valmsg-replace="true"></span> -->
            </div>
            <div class="editor-label">
                <label for="NewPassword">新密码</label>：
            </div>
            <div class="editor-field">
                <input class="easyui-validatebox" data-options="validType:'minLength[6]'" id="NewPassword" name="newPassword" type="password" />
                <!-- <span class="field-validation-valid" data-valmsg-for="NewPassword" data-valmsg-replace="true"></span> -->
            </div>
            <div class="editor-label">
                <label for="ConfirmPassword">确认密码</label>：
            </div>
            <div class="editor-field">
                <input class="easyui-validatebox" validType="equals['#NewPassword']"  id="ConfirmPassword" name="confirmPassword" type="password" />
                <!-- <span class="field-validation-valid" data-valmsg-for="ConfirmPassword" data-valmsg-replace="true"></span> -->
            </div>
            <p>
                <input class="buttonOn" type="submit" value="修改密码" />
            </p>
            <p>
                <span>${message}</span>
            </p>
        </fieldset>
    </div>
    </form>
    <c:remove var="message"/>
</body>
</html>
